﻿<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../helpproject.xsl" ?>
<topic template="Default" lasteditedby="Geert" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../helpproject.xsd">
  <title translate="true">ViewModelBase explained</title>
  <keywords>
    <keyword translate="true">MVVM</keyword>
    <keyword translate="true">View models</keyword>
    <keyword translate="true">ViewModelBase</keyword>
  </keywords>
  <body>
    <header>
      <para styleclass="Heading1"><text styleclass="Heading1" translate="true">ViewModelBase explained</text></para>
    </header>
    <para styleclass="Normal"><text styleclass="Normal" translate="true">Like almost every other MVVM framework, the base class for all View-Models is </text><link displaytype="text" defaultstyle="true" type="topiclink" href="T_Catel_MVVM_ViewModelBase" styleclass="Normal" translate="true">ViewModelBase</link><text styleclass="Normal" translate="true">. This base class is derived from the </text><link displaytype="text" defaultstyle="true" type="topiclink" href="T_Catel_Data_ModelBase" styleclass="Normal" translate="true">ModelBase</link><text styleclass="Normal" translate="true"> class explained earlier in this article, which gives the following advantages:</text></para>
    <list id="1" type="ul" listtype="bullet" formatstring="&#183;" format-charset="SYMBOL_CHARSET" levelreset="true" legalstyle="false" startfrom="1" styleclass="Normal (list)" style="font-family:Symbol; font-size:10pt; color:#000000;">
      <li styleclass="Normal (list)"><text styleclass="Normal (list)" translate="true">Dependency property a-like property registration;</text></li>
      <li styleclass="Normal (list)"><text styleclass="Normal (list)" translate="true">Automatic change notification;</text></li>
      <li styleclass="Normal (list)"><text styleclass="Normal (list)" translate="true">Support for field and business errors.</text></li>
    </list>
    <para styleclass="Normal"><text styleclass="Normal" translate="true">Because the class derives from </text><link displaytype="text" defaultstyle="true" type="topiclink" href="T_Catel_Data_ModelBase" styleclass="Normal" translate="true">ModelBase</link><text styleclass="Normal" translate="true">, you can simply add field and business errors that are automatically being reflected to the UI. Writing View-Models has never been so easy!</text></para>
  </body>
</topic>
